\(\int \frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \, dx\) [817]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [C] (verification not implemented)
   Maxima [C] (verification not implemented)
   Giac [C] (verification not implemented)
   Mupad [F(-1)]

Optimal result

Integrand size = 25, antiderivative size = 24 \[ \int \frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \, dx=\frac {\sqrt {a+b x} \log (x)}{\sqrt {-a-b x}} \]

[Out]

ln(x)*(b*x+a)^(1/2)/(-b*x-a)^(1/2)

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.080, Rules used = {23, 29} \[ \int \frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \, dx=\frac {\log (x) \sqrt {a+b x}}{\sqrt {-a-b x}} \]

[In]

Int[Sqrt[a + b*x]/(x*Sqrt[-a - b*x]),x]

[Out]

(Sqrt[a + b*x]*Log[x])/Sqrt[-a - b*x]

Rule 23

Int[(u_.)*((a_) + (b_.)*(v_))^(m_)*((c_) + (d_.)*(v_))^(n_), x_Symbol] :> Dist[(a + b*v)^m/(c + d*v)^m, Int[u*
(c + d*v)^(m + n), x], x] /; FreeQ[{a, b, c, d, m, n}, x] && EqQ[b*c - a*d, 0] &&  !(IntegerQ[m] || IntegerQ[n
] || GtQ[b/d, 0])

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rubi steps \begin{align*} \text {integral}& = \frac {\sqrt {a+b x} \int \frac {1}{x} \, dx}{\sqrt {-a-b x}} \\ & = \frac {\sqrt {a+b x} \log (x)}{\sqrt {-a-b x}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.00 \[ \int \frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \, dx=\frac {\sqrt {a+b x} \log (x)}{\sqrt {-a-b x}} \]

[In]

Integrate[Sqrt[a + b*x]/(x*Sqrt[-a - b*x]),x]

[Out]

(Sqrt[a + b*x]*Log[x])/Sqrt[-a - b*x]

Maple [A] (verified)

Time = 1.44 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.92

method result size
default \(-\frac {\sqrt {-b x -a}\, \ln \left (x \right )}{\sqrt {b x +a}}\) \(22\)
risch \(-\frac {i \sqrt {\frac {-b x -a}{b x +a}}\, \sqrt {b x +a}\, \ln \left (x \right )}{\sqrt {-b x -a}}\) \(41\)

[In]

int((b*x+a)^(1/2)/x/(-b*x-a)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/(b*x+a)^(1/2)*(-b*x-a)^(1/2)*ln(x)

Fricas [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.58 \[ \int \frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \, dx=-\frac {\sqrt {-b^{2}} \log \left (x\right )}{b} \]

[In]

integrate((b*x+a)^(1/2)/x/(-b*x-a)^(1/2),x, algorithm="fricas")

[Out]

-sqrt(-b^2)*log(x)/b

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.87 (sec) , antiderivative size = 37, normalized size of antiderivative = 1.54 \[ \int \frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \, dx=\begin {cases} - i \log {\left (-1 + \frac {b \left (\frac {a}{b} + x\right )}{a} \right )} & \text {for}\: \left |{\frac {b \left (\frac {a}{b} + x\right )}{a}}\right | > 1 \\- i \log {\left (1 - \frac {b \left (\frac {a}{b} + x\right )}{a} \right )} & \text {otherwise} \end {cases} \]

[In]

integrate((b*x+a)**(1/2)/x/(-b*x-a)**(1/2),x)

[Out]

Piecewise((-I*log(-1 + b*(a/b + x)/a), Abs(b*(a/b + x)/a) > 1), (-I*log(1 - b*(a/b + x)/a), True))

Maxima [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.21 (sec) , antiderivative size = 53, normalized size of antiderivative = 2.21 \[ \int \frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \, dx=b \sqrt {-\frac {1}{b^{2}}} \log \left (x + \frac {a}{b}\right ) - i \, \left (-1\right )^{2 \, a b x + 2 \, a^{2}} \log \left (\frac {2 \, a b x}{{\left | x \right |}} + \frac {2 \, a^{2}}{{\left | x \right |}}\right ) \]

[In]

integrate((b*x+a)^(1/2)/x/(-b*x-a)^(1/2),x, algorithm="maxima")

[Out]

b*sqrt(-1/b^2)*log(x + a/b) - I*(-1)^(2*a*b*x + 2*a^2)*log(2*a*b*x/abs(x) + 2*a^2/abs(x))

Giac [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.28 (sec) , antiderivative size = 7, normalized size of antiderivative = 0.29 \[ \int \frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \, dx=-i \, \log \left ({\left | b x \right |}\right ) \]

[In]

integrate((b*x+a)^(1/2)/x/(-b*x-a)^(1/2),x, algorithm="giac")

[Out]

-I*log(abs(b*x))

Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {a+b x}}{x \sqrt {-a-b x}} \, dx=\int \frac {\sqrt {a+b\,x}}{x\,\sqrt {-a-b\,x}} \,d x \]

[In]

int((a + b*x)^(1/2)/(x*(- a - b*x)^(1/2)),x)

[Out]

int((a + b*x)^(1/2)/(x*(- a - b*x)^(1/2)), x)